#demo1 {
  border: 1px solid red;
  width: 180px;
  height: 3.6em;
  overflow: hidden;
}
#demo1 ul {
  width: 500px;
  height: 100px;
  overflow: hidden;
  margin: 0;
}
#demo1 ul li {
  height: 1.2em;
}
